std::basic_istream::read

From Cppreference

Jump to: navigation, search
​basic_istream& read( char_type* s, streamsize count );

Extracts characters from stream.

If ​good() != true, ​setstate(failbit) is called and the function returns. At most count characters are extracted. If end-of-file is encountered earlier, ​setstate(eofbit​ is called and the function returns.

Contents

Parameters

s - pointer to the character string to store the characters to
count - number of characters to read

Return value

*this​

Example

See also

operator>>
extracts formatted data
(public member function)
readsome
extracts already available blocks of characters
(public member function)
get
extracts characters
(public member function)
getline
extracts characters until the given character is found
(public member function)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages